@import '~antd/lib/style/themes/default.less';

@nav-header-height: @layout-header-height;

.logo {
  position: relative;
  height: @nav-header-height;
  padding-left: (@menu-collapsed-width - 0.64rem) / 2;
  overflow: hidden;
  line-height: @nav-header-height;
  background: #002140;
  transition: all 0.3s;
  img {
    display: inline-block;
    height: 0.64rem;
    vertical-align: middle;
  }
  h1 {
    display: inline-block;
    margin: 0 0 0 0.24rem;
    color: white;
    font-weight: 600;
    font-size: 0.44rem;
    font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
    vertical-align: middle;
  }
}
.sider {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  box-shadow: 0.04rem 0 0.12rem rgba(0, 21, 41, 0.35);
  &.fixSiderBar {
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 0.04rem 0 0.16rem 0 rgba(29, 35, 41, 0.05);
    :global {
      .ant-menu-root {
        height: ~'calc(100vh - @{nav-header-height})';
        overflow-y: auto;
      }
      .ant-menu-inline {
        border-right: 0;
        .ant-menu-item,
        .ant-menu-submenu-title {
          width: 100%;
        }
      }
    }
  }
  &.light {
    background-color: white;
    box-shadow: 0.04rem 0 0.16rem 0 rgba(29, 35, 41, 0.05);
    .logo {
      background: white;
      box-shadow: 1px 1px 0 0 @border-color-split;
      h1 {
        color: @primary-color;
      }
    }
    :global(.ant-menu-light) {
      border-right-color: transparent;
    }
  }
  :global {
    .ant-menu-inline {
      .ant-menu-item {
        line-height: 1rem;
        height: 1rem;
        padding: 0 0.48rem !important;
        font-size: 0.4rem;
        margin: 0.16rem 0 !important;
      }
    }
    .ant-menu-sub {
      .ant-menu-item {
        padding-left: 0.96rem !important;
      }
    }
    .ant-menu-inline-collapsed > .ant-menu-item .anticon,
    .ant-menu-inline-collapsed
      > .ant-menu-item-group
      > .ant-menu-item-group-list
      > .ant-menu-item
      .anticon,
    .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title .anticon {
      font-size: 0.4rem;
      line-height: 1rem;
    }
    .ant-menu-inline-collapsed > .ant-menu-item {
      padding: 0 0.6rem !important;
    }
    .ant-menu-vertical .ant-menu-item,
    .ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
      line-height: 1rem;
      height: 1rem;
      margin: 0.16rem 0 !important;
      font-size: 0.4rem;
    }
    .ant-menu-inline .ant-menu-submenu-title {
      padding-left: 0.48rem !important;
    }
    .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title {
      padding: 0 0.6rem !important;
    }
    .ant-menu-inline .ant-menu-item .anticon,
    .ant-menu-item .anticon,
    .ant-menu-submenu-title .anticon {
      width: 0.4rem;
      min-width: 0.4rem;
      margin-right: 0.2rem;
      font-size: 0.4rem;
    }
  }
}

.icon {
  width: 0.4rem;
  margin-right: 0.2rem;
  vertical-align: baseline;
}

:global {
  .top-nav-menu {
    line-height: 0.92rem;
    .ant-menu-item .anticon,
    .ant-menu-submenu-title .anticon {
      width: 0.4rem;
      min-width: 0.4rem;
      margin-right: 0.2rem;
      font-size: 0.4rem;
    }
    .ant-menu-item,
    .ant-menu-submenu-title {
      padding: 0 0.4rem;
    }
  }
  .top-nav-menu li.ant-menu-item {
    height: @nav-header-height;
    line-height: @nav-header-height;
  }
  .drawer .drawer-content {
    background: #001529;
  }
  .ant-menu-inline-collapsed {
    & > .ant-menu-item .sider-menu-item-img + span,
    &
      > .ant-menu-item-group
      > .ant-menu-item-group-list
      > .ant-menu-item
      .sider-menu-item-img
      + span,
    & > .ant-menu-submenu > .ant-menu-submenu-title .sider-menu-item-img + span {
      display: inline-block;
      max-width: 0;
      opacity: 0;
    }
  }
  .ant-menu-item .sider-menu-item-img + span,
  .ant-menu-submenu-title .sider-menu-item-img + span {
    opacity: 1;
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
  }
  .ant-layout-sider-collapsed {
    width: 1.6rem !important;
    min-width: 1.6rem !important;
    max-width: 1.6rem !important;
  }
  .ant-drawer-left {
    .ant-drawer-body {
      padding: 0;
    }
  }
}
